﻿@model PagedList.PagedList<QuaLuuNiem.Models.SANPHAM>
@{
    ViewBag.Title = "Danh sách sản phẩm cửa hàng lưu niệm";
    Layout = "~/Views/Shared/_newLayout.cshtml";
}
<div class="center_center">
    <h2>Danh sách sản phẩm</h2>
    @foreach (var item in Model)
    {
    <div class="san_pham">
        <img src="../../Content/images/san_pham/@item.Hinh" />
        <span>
            @item.TenSP<br />
            Giá : &nbsp; <span style="color:#F00;">@item.DonGia</span> VNĐ <br />
            <input type="submit" name="DatHang" id="btnDatHang" value="Đặt mua" class="button_cm_ct" />  &nbsp; &nbsp;
            <input type="button" name="ChiTiet" id="btnChiTiet" value="Chi tiết" onclick="window.location.href='../../QuaLuuNiem/chi_tiet_san_pham/@item.MaSP'" class="button_cm_ct" /> <br />              
        </span>
    </div><!--end load san pham-->
    } 
</div>
<div class="center_center">
    <div class="phan_trang">
         Page @(Model.PageCount < Model.PageNumber ? 0 : Model.PageNumber)
    of @Model.PageCount
     
    @if (Model.HasPreviousPage)
    {
        @Html.ActionLink(" << ", "san_pham", new { page = 1, currentFilter = ViewBag.CurrentFilter})
        @Html.Raw(" ");
        @Html.ActionLink(" Prev ", "san_pham", new { page = Model.PageNumber - 1, currentFilter=ViewBag.CurrentFilter})
    }
    else
    {
        @:Prev 
        @Html.Raw(" ");
        @:<<
    }
     
    @if (Model.HasNextPage)
    {
        @Html.ActionLink(" Next ", "san_pham", new { page = Model.PageNumber + 1, currentFilter = ViewBag.CurrentFilter})
        @Html.Raw(" ");
        @Html.ActionLink(" >> ", "san_pham", new { page = Model.PageCount, currentFilter = ViewBag.CurrentFilter })
    }
    else
    {
        @:Next >>
        @Html.Raw(" ")
        @:>>
    }
    </div>

    @Html.ActionLink( "Quản lý sản phẩm (Thêm Xóa Sửa)","danh_sach_san_pham","Admin")  
    &larr;
</div><!--end noi dung-->